<template>
  <div>
      <h2>文章编辑页</h2>
      <el-form label-width='100px'>
        <!-- 输入框 -->
          <el-form-item label="标题" v-model="username">
            <el-input placeholder='请输入标题'></el-input>
          </el-form-item>
          <!-- 富文本框 -->
          <el-form-item label="内容" v-model="content"> 
              <VueEditor/>
          </el-form-item>
          <el-form-item label="栏目">
                 <el-checkbox-group v-model="checkList">
    <el-checkbox label="复选框 A"></el-checkbox>
    <el-checkbox label="复选框 B"></el-checkbox>
    <el-checkbox label="复选框 C"></el-checkbox>

  </el-checkbox-group>
          </el-form-item>
          <el-form-item label="封面">
                    <el-upload
          :action="$baseURL + '/upload'"
          list-type="picture-card"
          :headers="{
            Authorization: token
          }"
        >
          <i class="el-icon-plus"></i>
        </el-upload>
          </el-form-item>
          <el-form-item label="类型">
            <el-radio-group v-model="type">
          <el-radio :label="1">文章</el-radio>
          <el-radio :label="2">视频</el-radio>
        </el-radio-group>
          </el-form-item>
          <el-form-item>
            <el-button type='priamy'>提交</el-button>
          </el-form-item>
      </el-form> 
  </div>
</template>

<script>
import {VueEditor} from 'vue2-editor'
import { getToken } from '../utils/myToken'
export default {
   data () {
     return {
       checkList:[],
       token:getToken(),
       type:'',
       username:'',
       content:''
     }
   },
   components: {
     VueEditor
   }
}
</script>

<style>

</style>